package com.xinzhi.controller;

import com.xinzhi.service.LoginService;
import com.xinzhi.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("logout")
public class logoutcontroller {
@Autowired
private LoginService loginService;
    @GetMapping
    public Result login(@RequestHeader("Authorization") String token){
        // 登录 验证用户 访问用户表
      return   loginService.logout(token);
    }
}
